package com.javasm.bootcrud01.common;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class R {
    private Integer code;
    private String msg;
    private Object data;

    public  R(Integer  code , String msg){
        this.code = code;
        this.msg = msg;

    }
    public static R ok(){

        return new R(200,"success");
    }

    public static R ok(Object data){

        return new R(200,"success",data);
    }

}
